import { request } from '@/request'

/**
 * 登录信息
 * @param form 
 * @returns 
 */
type loginForm = {
  username: string,
  password: string
}
type loginResult = {
  id: number,
  name: string,
  token: string,
  username: string
}
export function loginApi(form: loginForm) {
  return request<loginResult>(
    '/admin/employee/login', "post", form
  )
}

export function logoutApi() {
  return request('/admin/employee/logout', "post")
}

export function getShopStatusApi() {
  return request<number>('/admin/shop/status', "get")
}

export function updateShopStatusApi(status:number|undefined) {
  return request(`/admin/shop/${status}`, "put")
}

